<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>ActiveSupport::Deprecation</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" />
<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>     
    <div class="banner">
        
            <span>Ruby on Rails v4.0.0</span><br />
        
        <h1>
            <span class="type">Class</span> 
            ActiveSupport::Deprecation 
            
                <span class="parent">&lt; 
                    
                    <a href="../Object.html">Object</a>
                    
                </span>
            
        </h1>
        <ul class="files">
            
            <li><a href="../../files/activesupport/lib/active_support/deprecation_rb.html">activesupport/lib/active_support/deprecation.rb</a></li>
            
            <li><a href="../../files/activesupport/lib/active_support/deprecation/behaviors_rb.html">activesupport/lib/active_support/deprecation/behaviors.rb</a></li>
            
            <li><a href="../../files/activesupport/lib/active_support/deprecation/instance_delegator_rb.html">activesupport/lib/active_support/deprecation/instance_delegator.rb</a></li>
            
            <li><a href="../../files/activesupport/lib/active_support/deprecation/method_wrappers_rb.html">activesupport/lib/active_support/deprecation/method_wrappers.rb</a></li>
            
            <li><a href="../../files/activesupport/lib/active_support/deprecation/proxy_wrappers_rb.html">activesupport/lib/active_support/deprecation/proxy_wrappers.rb</a></li>
            
            <li><a href="../../files/activesupport/lib/active_support/deprecation/reporting_rb.html">activesupport/lib/active_support/deprecation/reporting.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  
    <div class="description">
      
<p>Deprecation specifies the API used by <a href="../Rails.html">Rails</a> to
deprecate methods, instance variables, objects and constants.</p>

    </div>
  


  


  
  


  
    <!-- Namespace -->
    <div class="sectiontitle">Namespace</div>
    <ul>
      
        <li>
          <span class="type">MODULE</span>
          <a href="Deprecation/Behavior.html">ActiveSupport::Deprecation::Behavior</a>
        </li>
      
        <li>
          <span class="type">MODULE</span>
          <a href="Deprecation/MethodWrapper.html">ActiveSupport::Deprecation::MethodWrapper</a>
        </li>
      
        <li>
          <span class="type">MODULE</span>
          <a href="Deprecation/Reporting.html">ActiveSupport::Deprecation::Reporting</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="Deprecation/DeprecatedConstantProxy.html">ActiveSupport::Deprecation::DeprecatedConstantProxy</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="Deprecation/DeprecatedInstanceVariableProxy.html">ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="Deprecation/DeprecatedObjectProxy.html">ActiveSupport::Deprecation::DeprecatedObjectProxy</a>
        </li>
      
    </ul>
  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>N</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="Deprecation.html#method-c-new">new</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  
    <!-- Includes -->
    <div class="sectiontitle">Included Modules</div>
    <ul>
      
        <li>
          
            Singleton
          
        </li>
      
        <li>
          
            <a href="Deprecation/Behavior.html">
              ActiveSupport::Deprecation::Behavior
            </a>
          
        </li>
      
        <li>
          
            <a href="Deprecation/Reporting.html">
              ActiveSupport::Deprecation::Reporting
            </a>
          
        </li>
      
        <li>
          
            <a href="Deprecation/MethodWrapper.html">
              ActiveSupport::Deprecation::MethodWrapper
            </a>
          
        </li>
      
    </ul>
  



  

    

    

    
      <!-- Section constants -->
      <div class="sectiontitle">Constants</div>
      <table border='0' cellpadding='5'>
        
          <tr valign='top'>
            <td class="attr-name">DEFAULT_BEHAVIORS</td>
            <td>=</td>
            <td class="attr-value">{
:stderr =&gt; Proc.new { |message, callstack|
$stderr.puts(message)
$stderr.puts callstack.join(&quot;\n  &quot;) if debug
},
:log =&gt; Proc.new { |message, callstack|
logger =
if defined?(Rails) &amp;&amp; Rails.logger
Rails.logger
else
require 'active_support/logger'
ActiveSupport::Logger.new($stderr)
end
logger.warn message
logger.debug callstack.join(&quot;\n  &quot;) if debug
},
:notify =&gt; Proc.new { |message, callstack|
ActiveSupport::Notifications.instrument(&quot;deprecation.rails&quot;,
:message =&gt; message, :callstack =&gt; callstack)
},
:silence =&gt; Proc.new { |message, callstack| }
}</td>
          </tr>
          
            <tr valign='top'>
              <td>&nbsp;</td>
              <td colspan="2" class="attr-desc"><p>Default warning behaviors per <a
href="../Rails.html#method-c-env">Rails.env</a>.</p></td>
            </tr>
          
        
      </table>
    


    
      <!-- Section attributes -->
      <div class="sectiontitle">Attributes</div>
      <table border='0' cellpadding='5'>
        
          <tr valign='top'>
            <td class='attr-rw'>
              [RW]
            </td>
            <td class='attr-name'>deprecation_horizon</td>
            <td class='attr-desc'><p>The version the deprecated behavior will be removed, by default.</p></td>
          </tr>
        
      </table>
    


    <!-- Methods -->
    
      <div class="sectiontitle">Class Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-c-new">
            
              <b>new</b>(deprecation_horizon = '4.1', gem_name = 'Rails')
            
            <a href="Deprecation.html#method-c-new" name="method-c-new" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>It accepts two parameters on initialization. The first is an version of
library and the second is an library name</p>

<pre>ActiveSupport::Deprecation.new('2.0', 'MyLibrary')</pre>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/918f7038b3d4d4180a4d1056bb4b7b3f3b85508f/activesupport/lib/active_support/deprecation.rb#L35" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-new_source" class="dyn-source">
                <pre><span class="ruby-comment"># File activesupport/lib/active_support/deprecation.rb, line 35</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">deprecation_horizon</span> = <span class="ruby-string">'4.1'</span>, <span class="ruby-identifier">gem_name</span> = <span class="ruby-string">'Rails'</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">gem_name</span> = <span class="ruby-identifier">gem_name</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">deprecation_horizon</span> = <span class="ruby-identifier">deprecation_horizon</span>
  <span class="ruby-comment"># By default, warnings are not silenced and debugging is off.</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">silenced</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">debug</span> = <span class="ruby-keyword">false</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                        </div>

    </div>
  </body>
</html>    